<template>
    <div>
        <ul class="imgs flex">
            <li
                @click="ifShow = !ifShow,url = item"
                v-for="(item,index) in imgs"
                :key="index">
                <img :src="item">
            </li>
        </ul>
        <!-- 图片预览 -->
        <cmsPreview :ifShow="ifShow" :url="url"></cmsPreview>
    </div>
</template>

<script>
export default {
    props:["imgs"],
    data () {
        return {
            ifShow:false,
            url:""
        }
    },
}
</script>

<style lang="scss" scoped>
    .imgs{
        flex-wrap: wrap;
        li{
            width: 100px;
            height: 80px;
            overflow: hidden;
            margin: 10px 10px 10px 0;
            cursor: pointer;
            img{
                width: 100%;
                min-height: 80px;
            }
        }
    }
</style>
